package com.zengfa.task.client.vo;

import com.zengfa.task.api.enums.JobStatus;

import lombok.Data;

@Data
public class JobResult {

	private JobStatus status;
    
    private String message;
	
    public static JobResult error(String msg) {
    	JobResult r = new JobResult();
    	r.setMessage(msg);
    	r.setStatus(JobStatus.ERROR);
    	return r;
    }
    
    public static JobResult success() {
    	JobResult r = new JobResult();
    	r.setStatus(JobStatus.SUCCESS);
    	return r;
    }
    
    public static JobResult running() {
    	JobResult r = new JobResult();
    	r.setStatus(JobStatus.RUNNING);
    	return r;
    }
    
}
